This invention relates generally to the implementation of complex computations in an environment that has limited storage and execution resources. More particularly, this invention relates to transferring data from external memory to a local memory of a processor.
In certain areas of computing, for example in the audio/video field, complex algorithms must often be performed to decompress and manipulate audio and video data so that the data can be broadcast in real time. In the use of MPEG protocols to transmit data, for example, header information is removed from the payload data before the payload data can be displayed or played. Similarly, where the data is compressed, the data must be decompressed so that it can be put to use. A variety of other processes are similarly performed on the data in order to manipulate it.
In a processor with limited resources, however, this manipulation is often difficult to achieve in a time efficient manner. Namely, a processor with a limited local memory can only store a small amount of code to be executed and its accompanying data. Hence, a complete application program typically cannot be loaded into the local memory all at once. Therefore, there is a need for a system that can load code into the processor""s local memory in an efficient manner while the existing code resident in the processor is being executed.
Another drawback created by a small local memory is the start and stop nature of loading code into the local memory. Only a small amount of code can be stored by the small local memory. Hence, space in local memory typically must become available before it can be refilled with unexecuted code. Furthermore, the code that is being used to refill the space typically should be loaded by the time the remaining code finishes execution in order to achieve maximum efficiency. Thus, there is a tradeoff between waiting for enough space in local memory to become available and completely loading a space of local memory by the time the previous code has finished loading. Consequently, there is a need for a system that allows a transfer of data to be estimated such that the transfer of code from external memory to internal memory can be completed by the time the resident code completes execution.
One embodiment of the invention provides a method of processing data by executing a program in a local memory of a processor; accessing a queue of transfer parameters; and storing the transfer parameters in a portion of the local memory of the processor to facilitate a transfer of code or data. This method can be implemented by code which is operable to accomplish these acts.
Another embodiment of the invention provides a method of transferring data from an external memory to a local memory by determining an initial size of data block to be transferred from external memory to local memory of a processor; determining an optimum size for a uniform data block to be transferred from external memory to local memory of a processor; and determining a total number of data blocks to be transferred. Again, the method can be implemented by code which is operable to accomplish these acts.
Yet another embodiment of the invention provides a method of transferring data to a local memory of a processor in an efficient manner by implementing an application program to be run by a processor; initiating a transfer of data from an external memory to a processor; executing a portion of an application program; and determining that data has been transferred from external memory to the processor by utilizing a proportional relationship between the application program speed and the transfer of data speed. Code can be utilized which is operable to accomplish these acts.
These and other embodiments of the invention can be implemented in a variety of formats. This could include at least an actual integrated circuit, a core for insertion within an application specific integrated circuit (ASIC), as well as computer code that can wholly or partly describe (for such purposes as modeling or semiconductor manufacturing), the apparatus and/or method.
Other and further features of the invention will be apparent to those skilled in the art from a consideration of the following description taken in conjunction with the accompanying drawings wherein certain methods of and apparatuses for practicing the invention are illustrated. However, it is to be understood that the invention is not limited to the details disclosed but includes all such variations and modifications as fall within the spirit of the invention and the scope of the appended claims.